#-------------------------------------------------------------------------------
# Name:        Hangman
#
# Author:      Jack Kelly
#
# Created:     03/07/2012
# Copyright:   (c) Student 2012
# Licence:     <your licence>
#-------------------------------------------------------------------------------
def checkLetter(wordGuess, tempList):
    if (wordGuess in tempList):
        correctLetter(wordGuess, tempList)
    else:
        return False

def deleteLetter(wordGuess, tempList):
    loopcheck=True
    while (loopcheck==True):
        if(wordGuess in tempList):
            tempList.remove(wordGuess)
        else:
            loopcheck=False
    return tempList

def endGame(tempList, win):
    if (win==False):
        print("You are out of guesses. You are dead")
    if (win==True):
        print("A winner is you. Congratulations!")
        print("The word was: " + str(wordList))

def correctLetter(wordGuess, tempList)

def main():
    enterWord=input("Player One, enter your word:")
    wordList=list(enterWord)
    tempList=wordList
    guess=False;
    guessAmount=5;
    win=true
    print("Player Two, you must guess the word")
    print("The word is " + str(len(tempList)) + " letters long")
    while (len(tempList)>0 and guessAmount>0):
        print("You have " + str(guessAmount) + " guesses left")
        wordGuess=input("Enter your letter:")
        checkLetter(wordGuess, tempList)
        if (correct==True):
            print("You got one of the letters")
            win=True
            tempList=deleteLetter(wordGuess, tempList)
        if(correct==False):
            print("Your guess was bad and you should feel bad. Try again")
            guessAmount=guessAmount-1
            win=False
    endGame(wordList, win)

if __name__ == '__main__':
    main()
